<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="strutsTags"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
	<base href="<%=basePath%>">
	<head>
		<title>合同种类设置</title>
		<script type="text/javascript"
			src="resource/js/configuration/contractType.js"></script>
	</head>
	<body>
		<table id="table_contract_type" cellpadding="0" cellspacing="1"
			width="70%" class="tablesorter">
			<thead>
				<tr align="center">
					<th width="30%" nowrap="nowrap">
						合同种类名称
					</th>
					<th width="70%" nowrap="nowrap">
						合同种类描述
					</th>
				</tr>
			</thead>
			<tbody id="tbody_contract_type">
				<s:iterator value="allContractType">
					<tr id='<s:property value="id"/>' align="center"
						ondblclick="contractTypeManager.showUpdateForm(this);">
						<td align="center">
							<s:property value="ectName" />
						</td>
						<td align="center">
							<s:property value="ectDescription" />
						</td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		<div class="btnlink">
			<a style="cursor:hand;" id="link_add_contract_type">新增</a>
			<a style="cursor:hand;" id="link_delete_contract_type">删除</a>
			<a style="cursor:hand;" id="link_update_contract_type">修改</a>
			<a style="cursor:hand;" id="link_sort_contract_type">保存排序</a>
		</div>

		<div id="dialog_contract_type" title="合同种类设置"
			class="prompt_div_inline">
			<form id="contractTypeForm" method="post">
				<table class="prompt_div_body" width="100%">
					<tr>
						<td>
							合同种类名称
							<font color="red">*</font>:
						</td>
						<td class="errorMessage">
							<input id="ectName" TYPE="text" size="36" maxlength="64">
							<label id="label_ectName">
								&nbsp;
							</label>
						</td>
					</tr>
					<tr>
						<td>
							合同种类描述:
						</td>
						<td class="errorMessage">
							<s:textarea id="ectDescription" cols="30" rows="6"
								onkeyup="if(this.value.length>255){this.value=this.value.substring(0, 255);}" />
						</td>
					</tr>
					<tr>
						<td colspan="4" class="prompt_div_bottom">
							<input id="btn_add_contract_type" class="button" type="button"
								value="新增">
							<input id="btn_update_contract_type" class="button" type="button"
								value="修改">
							<input class="button" type="button" id="btn_contract_type_close"
								value="取消">
							<input type="hidden" id="ectId" />
							<input type="hidden" id="ectSortId" />
						</td>
					</tr>
				</table>
			</form>
		</div>
		<script type="text/javascript">
	var config = {
		tableId :"table_contract_type",
		tbodyId :"tbody_contract_type",
		dialogId :"dialog_contract_type",
		updateButton :"btn_update_contract_type",
		addButton :"btn_add_contract_type",
		addLink :"link_add_contract_type",
		deleteLink :"link_delete_contract_type",
		updateLink :"link_update_contract_type",
		sortLink :"link_sort_contract_type",
		closeButton :"btn_contract_type_close"
	};
	contractTypeManager = new ContractTypeManager(config);
</script>
	</body>
</html>